home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / test / test6.sml < prev    next >
Encoding:
Text File  |  1997-08-18  |  360 b   |  15 lines  |  [TEXT/R*ch]

  1. exception E;
  2. fun f() = let exception E in raise E end;
  3. f() handle E => "WRONG: Top-level E is caught"
  4.          | _ => "OK";
  5. val elist = [E, Size];
  6.  
  7. exception E' = E;
  8. (raise E) handle E' => "OK";
  9. (raise E') handle E => "OK";
  10.  
  11. exception G of int;
  12. (raise G 20) handle G 10 => "WRONG: G 10"
  13.                   | E    => "WRONG: E"
  14.                   | G 20 => "OK";
  15.